package com.peixunp.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.peixunp.bean.Information;
import com.peixunp.bean.InformationKey;
import com.peixunp.dao.InformationDao;
import com.peixunp.service.InformationService;

import finaler.util.Page;
import finaler.util.PageList;

public class InformationServiceImpl implements InformationService {

	@Autowired
	private InformationDao informationDao;

	@Override
	public List<Information> getInformationList(int orgid) throws Exception {
		return informationDao.getInformationList(orgid);
	}

	@Override
	public boolean insert(Information information) throws Exception {
		return informationDao.insert(information);
	}

	@Override
	public List<Information> getAuditList() throws Exception {
		return informationDao.getAuditList();
	}

	@Override
	public Information findByKey(int infoId) throws Exception {
		return informationDao.findByKey(new InformationKey(infoId));
	}

	@Override
	public boolean update(Information information) throws Exception {
		return informationDao.update(information);
	}

	@Override
	public boolean delete(Information information) throws Exception {
		return informationDao.delete(information);
	}

	@Override
	public PageList getAllInfoList(Page page) throws Exception {
		return informationDao.getAllInfoList(page);
	}
}
